package com.itwill.ecom.ordersDetail;

import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonRootName;

/*
CREATE TABLE ORDERSDETAIL
(
    ODETAIL_NO NUMBER(10) NOT NULL PRIMARY KEY,
    ODETAIL_ORDERSNO NUMBER(10) NOT NULL,
    ODETAIL_PRODUCT NUMBER(10) NOT NULL,
    ODETAIL_COUNT NUMBER(10) NOT NULL,
    CONSTRAINT ORDERSDETAIL_FK_ORDERSNO FOREIGN KEY (ODETAIL_ORDERSNO)
                                REFERENCES ORDERS(ORDERS_NO) ON DELETE SET NULL,
    CONSTRAINT ORDERSDETAIL_FK_PRODUCT FOREIGN KEY (ODETAIL_PRODUCT)
                                REFERENCES PRODUCT(PRODUCT_NO) ON DELETE SET NULL
);
 */
@JsonRootName("OrdersDetailBeans")
public class OrdersDetailBeans {
	@JsonProperty("odetail_no")
	int odetail_no;
	@JsonProperty("odetail_ordersno")
	int odetail_ordersno;
	@JsonProperty("odetail_product")
	int odetail_product;
	@JsonProperty("odetail_count")
	int odetail_count;
	
	public OrdersDetailBeans() {
		// TODO Auto-generated constructor stub
	}

	public OrdersDetailBeans(int odetail_no, int odetail_ordersno,
			int odetail_product, int odetail_count) {
		super();
		this.odetail_no = odetail_no;
		this.odetail_ordersno = odetail_ordersno;
		this.odetail_product = odetail_product;
		this.odetail_count = odetail_count;
	}

	public int getOdetail_no() {
		return odetail_no;
	}

	public void setOdetail_no(int odetail_no) {
		this.odetail_no = odetail_no;
	}

	public int getOdetail_ordersno() {
		return odetail_ordersno;
	}

	public void setOdetail_ordersno(int odetail_ordersno) {
		this.odetail_ordersno = odetail_ordersno;
	}

	public int getOdetail_product() {
		return odetail_product;
	}

	public void setOdetail_product(int odetail_product) {
		this.odetail_product = odetail_product;
	}

	public int getOdetail_count() {
		return odetail_count;
	}

	public void setOdetail_count(int odetail_count) {
		this.odetail_count = odetail_count;
	}
	
	@Override
	public String toString() {
		return ">>> "+"상세번호: "+odetail_no
					 +", 주문번호: "+odetail_ordersno
					 +", 상품번호: "+odetail_product
					 +", 주문금액: "+odetail_count
					 +"\n";
	}
}
